home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.3 / Video Toaster v4.3.iso / 3.1 / toasterall / arexx_examples / toastsmf.rexx < prev    next >
OS/2 REXX Batch file  |  1993-06-06  |  2KB  |  72 lines

  1. /* Query and Set Effects Speeds  */
  2. /* By Arnie Cachelin  © 1992 NewTek Inc. */
  3.  
  4. OPTIONS RESULTS
  5.  
  6. TOASTERLIB="ToasterARexx.port"    /* Name of the Toaster function host port */
  7. IF ~SHOW('Libraries',TOASTERLIB) THEN
  8.   IF ~ADDLIB(TOASTERLIB , 0) THEN x=Bummer(" Me No Find Toaster Library!")
  9.  
  10.  
  11. say "Dissolve rate? (fields)"
  12. pull r
  13. Switcher(TOSW)
  14. Switcher(MDV1)
  15. Switcher(PDV2)
  16. do while r~=0
  17.     Switcher(TAKE)
  18.     Call CustDissolve(r)
  19.     Switcher(TOWB)
  20.     say "Dissolve rate?"
  21.     pull r
  22.     Switcher(TOSW)
  23.     end
  24. Switcher(TOWB)
  25.  
  26. n=LogEffects()
  27. do i=1 to n
  28.     say effect.i sspeed.i mspeed.i fspeed.i vspeed.i
  29.     end
  30.  
  31. exit
  32.  
  33. /* This routine will find and store all the effects speeds as well as making
  34.    an easy way to convert from effect numbers (returned by STAT,GRID) to the
  35.    bank/row/column notation used to select the effects
  36. */
  37.  
  38. LogEffects:
  39.   i=0
  40.   do Grid=1 to 9
  41.       Grd=translate(Grid,"ABCDEFGHI","123456789")
  42.       Switcher(CHGR,Grd)
  43.        Do Row=1 to 4
  44.         Do Col=1 to 8
  45.           effect.i=Grd||Row||Col
  46.           if Switcher(CKGD,effect.i) then Do
  47.             sspeed.i=Switcher(RDGD,effect.i,'S')
  48.             mspeed.i=Switcher(RDGD,effect.i,'M')
  49.           fspeed.i=Switcher(RDGD,effect.i,'F') 
  50.           vspeed.i=Switcher(RDGD,effect.i,'V') 
  51.             end
  52.           i=i+1
  53.           end col
  54.         end row
  55.     end grid
  56.     return i-1
  57.  
  58.  
  59. CustDissolve: Procedure /* execute custom speed dissolve, specify duration in fields */
  60.     arg rate
  61.     if ~Switcher(CKGD,A48) then effect='A11'  /* GetSmall project */
  62.     else do
  63.         effect='A48'
  64.         call Switcher(GRID,'A11') /* select other effect */
  65.         end
  66.     Switcher(WTGD,'A48','V',rate) /* Change Variable duration */
  67.     Switcher(GRID,effect)
  68.     Switcher(SVAR)    /* Set to variable speed (altered) */
  69.     Switcher(AUTO)
  70.     return
  71.  
  72.